
            <h1 align="center">团购订单情况 <small>(每60s刷新一次)</small></h1>
          </div>
          <div class="panel panel-default">
          
          <!-- Default panel contents -->
          <!-- <div class="panel-heading">历史记录</div> -->

          <!-- Table -->
          <table class="table table-striped table-condensed">
            <thead>
              <tr>
                <th>团购码</th>
                <th>下单时间</th>
                <th>团购名称</td>
                <th>有效期</td>
                <th>用户名称</th>
                <th>用户电话</th>
                <th>用户地址</th>
                <th>用户备注</th>
                <th>购买数量</th>
                <th>总价</th>
                <th>状态</th>
              </tr>
            </thead>
            <tbody>
              <?php foreach ($group_bills as $question_item): ?>
                <tr>
                  <td><?php echo $question_item['group_bill_id'] . $question_item['bill_gen_key'] ;?></td>
                  <td><?php echo $question_item['bill_time'] ;?></td>
                  <td>
                    <a href='<?php 
                                if($user == 'admin')
                                  echo site_url("groupadmin/groupdetail?group_id=") . $question_item['group_id'];
                                if($user == 'store')
                                  echo site_url("storeadmin/groupdetail?group_id=") . $question_item['group_id']; 
                             ?>'>
                      <?php echo $question_item['group_name'];?>
                    </a>
                  </td>
                  <td><?php echo $question_item['use_deadline'] ;?></td>
                  <td><?php echo $question_item['user_name'] ;?></td>
                  <td><?php echo $question_item['user_phone'] ;?></td>
                  <td><?php 
                    if($question_item['user_addr'] != null)
                      echo $question_item['user_addr'];
                    else
                      echo "无";
                  ?></td>

                  <?php $note = $question_item['bill_note'];
                        $data_attr = "data-original-title='" . $note . "'";
                  ?>
                  <td>
                    <?php if ($note != ""){ ?>
                      <a  href="#" data-toggle="tooltip" title="" <?php echo $data_attr ;?> >查看</a>
                    <?php } else echo "无";?>
                  </td>

                  <td>
                    <?php echo $question_item['buy_amount'] ;?>
<!--                     <?php if ($showdetail == true){ ?>
                      <table class="table table-bordered">
                        <tbody>
                          <?php foreach ($detail['list'] as $item): ?>
                          <tr>
                            <td><?php echo $item['item_name'] ;?></td>
                            <td><?php echo $item['item_account'] ;?></td>
                            <td><?php echo $item['item_price'] ;?></td>
                          </tr>
                          <?php endforeach ?>
                          
                        </tbody>
                      </table>
                    <?php } ?> -->
                  </td>
                  <td><?php echo $question_item['buy_amount']*$question_item['group_price'] ;?></td>
                  <td><?php 
                        if($question_item['bill_state']==0)
                          echo "未使用";
                        else
                          echo "已使用<br/>" . $question_item['use_time'];
                      ?>
                  </td>
                </tr>
              <?php endforeach ?>
            </tbody>
          </table>
        </div>
          
